<?php
/**
 * @Author: Marte
 * @Date:   2017-08-22 07:46:14
 * @Last Modified by:   Marte
 * @Last Modified time: 2017-08-22 08:00:40
 */
require '../data/config_connect.php';
$_sql='select zan from book_section where id="'.$_GET['id'].'"';
$_result=$_mysql->query($_sql);
$_assoc=$_result->fetch_assoc();
$num=$_assoc['zan'];
$num=$num+1;
$sqll='update book_section set zan="'.$num.'" where id="'.$_GET['id'].'" ';
if($_mysql->query($sqll))
{
    echo "<script>alert('点赞成功！');window.history.back();</script>";
}
else{
    echo "<script>alert('点赞失败！');window.history.back();</script>";
}
?>
